how are stars formed from nebula